<template>
  <div>
      这是测试界面
      这是账号:{{zhanghao}}
      这是id:{{id}}
      这是分数:{{fen}}
      这是总分数:{{zong}}
      <button @click="tuichu">退出</button>
      <button @click="tiao"> 大树</button>
      <button @click="dadishu">打</button>
  </div>
</template>

<script>
export default {

    data() {
        return {
            zhanghao:'无账号',
            id:0,
            fen:0,
            zong:0,
            
        }
    },
   created() {
      
        this.zhanghao=localStorage.getItem("username")
        this.id=localStorage.getItem("id")
        this.fen=localStorage.getItem("fen")
        this.zong=localStorage.getItem("fenSum")
    },
methods: {
    tuichu(){
    localStorage.clear();
    this.$router.push('/')
    },
    tiao(){
        this.$router.push("/zhong");
    },
    dadishu(){
        this.$router.push("/daview");
    }
    

},
}
</script>

<style>

</style>